package com.zxy.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.zxy.pojo.User;

@Repository("userdao")
public class UserDao extends BaseDaoImpl<User>{
	public User findByName(String u){
		String hql="from User u where u.uname=?";
		List user=(List)this.getHibernateTemplate().find(hql, new String[]{u});
		if(user.size()>0){
			User myuser=(User)user.get(0);
			return myuser;
		}else{
			return null;
		}
	}
}
